//
// Copyright (c) 1997 Molecular Structure Corporation
//
// RESTRICTED RIGHTS NOTICE SHORT FORM (JUNE 1987)
//
// Use, reproduction, or disclosure is subject to restrictions set
// forth in Contract No. W-31-109-ENG-38 and Contract No. 
// 943072401 with the University of Chicago, Operator of
// Argonne National Laboratory.
//
// CUIom9.h           Initial author: J.W. Pflugrath           9-Apr-1997
//    New revised Motif option menu class for use with d*TREK and dtprocess.
/*
 *
 * Copyright (C) 2014 Rigaku Americas Corporation
 *                    9009 New Trails Drive
 *                    The Woodlands, TX, USA  77381
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *    * Redistributions of source code must retain the above copyright
 *      notice(s), this list of conditions and the following disclaimer.
 *    * Redistributions in binary form must reproduce the above copyright
 *      notice(s), this list of conditions and the following disclaimer in the
 *      documentation and/or other materials provided with the distribution.
 *    * Neither the name of the Rigaku Americas Corporation nor the 
 *      names of its contributors may be used to endorse or promote products
 *      derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL RIGAKU AMERICAS CORPORATION BE LIABLE 
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
*/

//
// README: Portions of this file are merged at file generation
// time. Edits can be made *only* in between specified code blocks, look
// for keywords <Begin user code> and <End user code>.
//
//////////////////////////////////////////////////////////////
//
// Header file for CUIom9
//
//    This file is generated by Builder Xcessory 3.5.1.
//
//    This class is a user interface "component", as described
//    in "Object-Oriented Programming with C++ and OSF/Motif",
//    by Douglas Young, Prentice Hall, 1992. ISBN 0-13-630252-1
//
//////////////////////////////////////////////////////////////
#ifndef CUIom9_H
#define CUIom9_H
#include "UIComponent.h"

//
// Globally included information (change thru Output File Names Dialog).
//


//
// Class Specific Includes (change thru the class in Resource Editor).
//



// Begin user code block <head> 

#include "CXhelp.h"
typedef void (*CUIom9Callback) (XtPointer, Widget, XtPointer, XtPointer);

// End user code block <head> 

class CUIom9 : public UIComponent
{

  public:

    CUIom9(const char *, Widget);
    CUIom9(const char *);
    virtual ~CUIom9();
    virtual void create(Widget);
    const char *const  className();
    void set_pb0_userData(XtPointer);
    void set_pb1_userData(XtPointer);
    void set_pb2_userData(XtPointer);
    void set_pb3_userData(XtPointer);
    void set_pb4_userData(XtPointer);
    void set_pb5_userData(XtPointer);
    void set_pb6_userData(XtPointer);
    void set_pb7_userData(XtPointer);
    void set_pb8_userData(XtPointer);
    
    // Begin user code block <public> 
    void vButtonSetSensitive(const int, const Boolean);
    Boolean bButtonGetSensitive(const int);
    const char *const pcGetLabel(void);
    int nGetValue(void);
    void vSetValue(const int, char * = NULL);
    void vSetLabel(const char *, char * = NULL);
    void vSetButtonLabel(const int, char *);
    char *pcGetButtonLabel(const int);
    virtual void vScanUnmanage(void);
      
    XtPointer       m_pObj;        // For callback, pointer to an object
    CUIom9Callback  m_prvCUIom9Callback;

    // End user code block <public> 
  protected:
    // Classes created by this class
    
    // Widgets created by this class
    Widget _CUIom9;
    Widget _om9;
    Widget _pm9;
    Widget _pb0;
    Widget _pb1;
    Widget _pb2;
    Widget _pb3;
    Widget _pb4;
    Widget _pb5;
    Widget _pb6;
    Widget _pb7;
    Widget _pb8;
    
    // These virtual functions are called from the private callbacks 
    // or event handlers intended to be overridden in derived classes
    // to define actions
    
    
    // Begin user code block <protected> 

    //
    // Callback client data.
    //
      UICallbackStruct  *_clientDataStructs;
      char *m_pcLabel;     // The string on the option menu which gives
	                   // its value as a string
      int   m_nNumOptions; // Number of options in the option menu
      Widget *m_a9pPb[9];

    virtual void vPushCB(Widget, XtPointer, XtPointer);
    // End user code block <protected> 
  private: 
    
    //
    // Default application and class resources.
    //
    static String         _defaultCUIom9Resources[];
    static UIAppDefault   _appDefaults[];
    static Boolean        _initAppDefaults;
    
    //
    // Callbacks to interface with Motif.
    //
    
    // Begin user code block <private> 
    CXhelp   *m_poXhelp;
    static void vPushCBCallback(Widget, XtPointer, XtPointer);
    
    // End user code block <private> 
};

// Begin user code block <tail> 
// End user code block <tail> 
#endif
